<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增书籍章节')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-bookchapters-add">
        
        	<div class="form-group">
				<label class="col-sm-3 control-label">书籍列表：</label>
				<div class="col-sm-8">
					<select name="bookId" class="form-control m-b" th:with="type=${@bookinfo.getInfos(1)}">
	                    <option th:each="bookinfo : ${type}" th:text="${bookinfo.bookName}" th:value="${bookinfo.id}" th:field="*{chapters.bookId}"></option>
	                </select>
				</div>
			</div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">上级ID标识：</label>
                <div class="col-sm-8">
                    <input id="parentId" readonly="readonly" name="parentId" class="form-control" type="text" th:value="${parentId}"   />
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">章节名称：</label>
                <div class="col-sm-8">
                    <input name="deptName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">显示顺序：</label>
                <div class="col-sm-8">
                    <input name="orderNum" class="form-control" type="number">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">作者：</label>
                <div class="col-sm-8">
                    <input name="leader" class="form-control" type="text">
                </div>
            </div>
            <!-- <div class="form-group">    
                <label class="col-sm-3 control-label">联系电话：</label>
                <div class="col-sm-8">
                    <input name="phone" class="form-control" type="text">
                </div>
            </div> -->
            <!-- <div class="form-group">    
                <label class="col-sm-3 control-label">邮箱：</label>
                <div class="col-sm-8">
                    <input name="email" class="form-control" type="text">
                </div>
            </div> -->
            <div class="form-group">    
                <label class="col-sm-3 control-label">状态：</label>
                <div class="col-sm-9">
				    <label class="radio-box">
				        <input type="radio" checked="true" value="0" id="optionsRadios1" name="status">正常
				    </label>
				    <label class="radio-box">
				        <input type="radio"  value="1" id="optionsRadios2" name="status">停用
				    </label>
				</div>
            </div>
            <!-- <div class="form-group">    
                <label class="col-sm-3 control-label">删除标志：</label>
                <div class="col-sm-8">
                    <input name="delFlag" class="form-control" type="text">
                </div>
            </div> -->
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/bookchapters"
        $("#form-bookchapters-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-bookchapters-add').serialize());
            }
        }
    </script>
</body>
</html>